package cn.com.bonc.khjy.date.dao.dataSource1;


import cn.com.bonc.khjy.date.mapper.dataSource1.CommonMapper1;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class CommonDao1 {

    private Logger logger = LoggerFactory.getLogger(CommonDao1.class);

    @Autowired
    private CommonMapper1 mapper;

    public List<String> getTopic() {
        return mapper.getTopic();
    }

    public List<Map<String, Object>> getBaseActivityList(Integer pageNum, Integer pageSize, String activityName) {
        int start = (pageNum-1) * pageSize;
        int end = pageNum * pageSize;
        return mapper.getBaseActivityList(start,end,activityName);
    }

    public String getCustomerCount(String activity_code) {
        return mapper.getCustomerCount(activity_code);
    }

    public Map<String, Object> getBaseActivityInfo(String activityCode) {
        return mapper.getBaseActivityInfo(activityCode);
    }

    public List<Map<String, Object>> getSubCustomerGroupInfo(String activityCode) {
        return mapper.getSubCustomerGroupInfo(activityCode);
    }

    public String getStrategyNodeId(String nodeId) {
        return mapper.getStrategyNodeId(nodeId);
    }

    public String getStrategyInfo(String strategyNodeId) {
        return mapper.getStrategyInfo(strategyNodeId);
    }

    public String getChannelNodeId(String strategyNodeId) {
        return mapper.getChannelNodeId(strategyNodeId);
    }

    public String getChannelInfo(String channelNodeId) {
        return mapper.getChannelInfo(channelNodeId);
    }

    public String getCustomerGroupInfo(String activityCode) {
        return mapper.getCustomerGroupInfo(activityCode);
    }
}
